//
//  ImageButton.m
//  CsGoldHD
//
//  Created by mac on 13-1-7.
//  Copyright (c) 2013年 mac. All rights reserved.
//

#import "ImageButton.h"
#import <QuartzCore/QuartzCore.h>

@implementation ImageButton
@synthesize img;
@synthesize btn;
@synthesize blackView;

-(void)initView
{
    img.layer.masksToBounds = YES;
    img.layer.borderWidth = 0.8;
    img.layer.borderColor = [[UIColor grayColor] CGColor];
    [img setContentMode:UIViewContentModeScaleAspectFit];
    [img setClipsToBounds:YES];
}


-(void)setSelected:(BOOL)selected
{
    if (selected) {
        blackView.hidden = YES;
        img.layer.borderWidth = 2;
        img.layer.borderColor = [[UIColor redColor] CGColor];
       
    }else{
        blackView.hidden = NO;
        img.layer.borderWidth = 0.8;
        img.layer.borderColor = [[UIColor grayColor] CGColor];
       
    }
}


@end
